﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace childApp.tool
{
    public partial class DateToolForm : Form
    {
        public DateToolForm()
        {
            InitializeComponent();
        }

        private void monthCalendar1_DayRender(object sender, Pabo.Calendar.DayRenderEventArgs e)
        {
            Brush bgBrush = new SolidBrush(Color.White);
            Brush dateBrush = new SolidBrush(Color.Black);
            Font dateFont = new Font("Microsoft Sans Serif", (float)8.25);
            StringFormat dateAlign = new StringFormat();

            dateAlign.Alignment = StringAlignment.Far;
            dateAlign.LineAlignment = StringAlignment.Near;

            Rectangle rect = new Rectangle(0, 0, e.Width, e.Height);

            // Set OwnerDraw = true to override built in formatting
            e.OwnerDraw = true;
            // ...then Draw the appearance of the date

            e.Graphics.FillRectangle(bgBrush, rect);
            e.Graphics.DrawString(e.Date.Day.ToString() + "\n1111",
                       dateFont, dateBrush, rect, dateAlign);

            // Clean up
            bgBrush.Dispose();
            dateBrush.Dispose();
            dateAlign.Dispose();
            dateFont.Dispose();

        }

    }
}
